﻿@using ZBJF.Warranty.BLL
@using ZBJF.Warranty.Common.Enums.InsuranceWarranty
@model ZBJF.Warranty.Model.InsuranceWarrantyRecord
@{
    var insuranceWarrantyRecordHistoryList = ServiceFactory.InsuranceWarrantyRecordServiceInstance.LoadByInsuranceOrderId(Model.InsuranceOrderId);
}
<h4>保单历史服务信息</h4>
<table class="table table-responsive table-bordered table-hover">
    <tr>
        <th>服务单号</th>
        <th>服务发起时间</th>
        <th>服务完成时间</th>
        <th>服务处理结果</th>
        <th>处理人</th>
    </tr>
    @foreach (var item in insuranceWarrantyRecordHistoryList)
    {
        <tr>
            <td>
                @item.WarrantyRecordNo
            </td>
            <td>
                @item.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")
            </td>
            <td>
                @(ServiceFactory.InsuranceWarrantyRecordStatusServiceInstance.GetParentStatusCode(item.Status) == (byte)InsuranceWarrantyStatus.Processed ? item.LastModifyTime.ToString("yyyy-MM-dd HH:mm:ss") : "")
            </td>
            <td>
                @ZBJF.Warranty.Common.Common.EnumHelper.Instance.GetDescription(typeof(InsuranceWarrantyStatus), item.Status)
            </td>
            <td>
                @(item.SystemUser == null ? "" : item.SystemUser.UserDisPlayName)
            </td>
        </tr>
    }
</table>